<template>
	<view class="pad-lr-30">
		<view class="display view_view pad-tb-40">
			<view class="left_view">
				地区
			</view>
			<view class="right_view display-sb align-items" >
					<view class="ml10  fontSize-28 col-6">{{info.city_text}}</view>
			</view>
		</view>
		<view class="display-sb view_view pad-tb-40">
			<view class="left_view">
				详细地址
			</view>
			<view class="right_view display-sb align-items">
				<view class="display align-items">
					<input type="text" class="ml10 fontSize-28" v-model="info.address" placeholder="请填写详细地址" />
				</view>
			</view>
		</view>
		<view class="display-sb view_view pad-tb-40">
			<view class="left_view">
				门店名称
			</view>
			<view class="right_view display-sb align-items">
				<view class="display align-items">
					<input type="text" class="ml10 fontSize-28" v-model="info.name" placeholder="请填写门店名称" />
				</view>
			</view>
		</view>
		<view class="display-sb view_view pad-tb-40">
			<view class="left_view">
				联系方式
			</view>
			<view class="right_view display-sb align-items">
				<view class="display align-items">
					<input type="number" maxlength="11" class="ml10 fontSize-28" v-model="info.phone" placeholder="请填写联系方式" />
				</view>
			</view>
		</view>
		<view class="mar-top-30 fontSize-30">logo主图</view>
		<view class="display align-items flex-wrap">
			<image :src="info?.image_text" class="wid-hig-200 mar-top-20 ml10 mar-right-10" mode="aspectFill" @click="seeimg(0,[info?.image_text])"></image>
		</view>
		<view class="mar-top-30 fontSize-30">营业执照</view>
		<view class="display align-items flex-wrap">
			<image :src="info?.business_image_text" class="wid-hig-200 mar-top-20 ml10 mar-right-10" mode="aspectFill" @click="seeimg(0,[info?.business_image_text])"></image>
		</view>
		<view class="mar-top-30 fontSize-30">门店照片</view>
		<view class="display align-items flex-wrap">
			<image :src="item" class="wid-hig-200 mar-top-20 ml10 mar-right-10" :key="index" v-for="(item,index) in info?.images_text" mode="aspectFill" @click="seeimg(index,info?.images_text)"></image>
		</view>
	</view>
</template>

<script lang="ts" setup>
import { onLoad } from '@dcloudio/uni-app';
import { ref } from 'vue';
import {indexshopInfo} from '@/utils/api'
onLoad((options)=>{
	id.value = options.id
	_indexshopInfo()
})
const id = ref()
const info = ref({
	province:'',
	address:'',
	name:'',
	phone:'',
	image_text:'',
	business_image_text:'',
	images_text:[]
})
const _indexshopInfo=()=>{
	indexshopInfo({id:id.value}).then(res=>{
		if(res.code==1){
			info.value = res.data.shop
		}
	})
}
const seeimg = (item,list) =>{
	uni.previewImage({
		urls:list,
		current:item
	});
}
</script>

<style lang="scss">
.view_view{
	border-bottom: 3rpx solid #F9F9F9;
}
.left_view{
	width: 180rpx;
}
.right_view{
	width: 512rpx;
	.you_icon{
		width: 28rpx;
		height: 28rpx;
	}
}
</style>
